Merge pull request #443 from cantino/fix_header_prop_link

method: post was required for nav link to work

Andrew Cantino 10 years ago
parent
commit
43f337e9b9
2 changed files with 3 additions and 3 deletions
  1. 2 2
      app/helpers/application_helper.rb
  2. 1 1
      app/views/layouts/_navigation.html.erb

+ 2 - 2
app/helpers/application_helper.rb

@@ -1,9 +1,9 @@
1 1
 module ApplicationHelper
2 2
   def nav_link(name, path, options = {}, &block)
3
-    if glyphicon = options[:glyphicon]
3
+    if glyphicon = options.delete(:glyphicon)
4 4
       name = "<span class='glyphicon glyphicon-#{glyphicon}'></span> ".html_safe + name
5 5
     end
6
-    content = link_to(name, path)
6
+    content = link_to(name, path, options)
7 7
     active = current_page?(path)
8 8
     if block
9 9
       # Passing a block signifies that the link is a header of a hover

+ 1 - 1
app/views/layouts/_navigation.html.erb

@@ -15,7 +15,7 @@
15 15
       <%= nav_link "Agents", agents_path do %>
16 16
         <ul class='dropdown-menu' role='menu'>
17 17
           <%= nav_link "New Agent", new_agent_path, glyphicon: "plus" %>
18
-          <%= nav_link "Run event propagation", propagate_agents_path, glyphicon: "refresh" %>
18
+          <%= nav_link "Run event propagation", propagate_agents_path, method: 'post', glyphicon: "refresh" %>
19 19
           <%= nav_link "View Diagram", diagram_path, glyphicon: 'random' %>
20 20
         </ul>
21 21
       <% end %>